#!/bin/bash
#=======================
# Author : Ali Moradzade
# Created: 2022/01/07
#=======================

# read file and create INSERT statements for MySql

outfile='members.sql'
IFS=','
while read lname fname address city state zip
do
	cat >> $outfile << EOF
INSERT INTO members (lname, fname, address, city, state, zip) VALUES
	('$lname', '$fname', '$address', '$city', '$city', '$zip');
EOF
done < ${1}
